home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / pdisk.zip / FDTBL.ASM < prev    next >
Assembly Source File  |  1989-01-12  |  1KB  |  49 lines

  1. ; FDTBL:  Create fixed disk table to use instead of default DOS ones.
  2. ; This version can ONLY be used if you aren't going to use the Diagnostic
  3. ; routines -- these routines screw up the memory management and overwrite the
  4. ; table.  See accompanying program FDTBLINT if you're going to use the diags.
  5. ;
  6. ; See accompanying program fdins.c for patching this program.
  7.     .RADIX    16
  8. INTR    EQU    (41*4)
  9. DISKNO    EQU    80
  10.  
  11. CSEG    SEGMENT
  12.     ORG    100
  13.     ASSUME    CS:CSEG,DS:CSEG
  14. BEGIN:    JMP    SHORT START
  15. DATA:    DW    400        ; number of cylinders
  16.     DB    4        ; number of heads
  17.     DW    -1        ; starting reduced write current cylinder (XT only)
  18.     DW    -1        ; starting write precompensation cylinder
  19.     DB    0        ; max ECC data burst length (XT only)
  20.     DB    0        ; control byte
  21.     DB    0        ; standard time out value (XT only)
  22.     DB    0        ; format time out value (XT only)
  23.     DB    0        ; check drive time out value (XT only)
  24.     DW    400    ; landing zone cyl (usually same as number of cyl)
  25.     DB    11        ; number of sectors per track (don't change)
  26.     DB    0        ; reserved
  27. START:    MOV    SI,OFFSET DATA
  28.     MOV    DI,5C
  29.     MOV    AX,DI
  30.     MOV    BX,CS
  31.     MOV    ES,BX
  32.     MOV    CX,8
  33.     CLD
  34.     REP     MOVSW
  35.     XOR    CX,CX
  36.     MOV    ES,CX
  37.     MOV    ES:[INTR],AX
  38.     MOV    ES:[INTR+2],BX
  39.     MOV    AH,9        ; "initialize characteristics"
  40.     MOV    DL,DISKNO
  41.     INT    13
  42.     MOV    AH,0        ; "reset disk"
  43.     INT    13
  44.     MOV    DX,7        ; retain 7 paragraphs -- first 70 hex bytes
  45.     MOV    AX,3100    ; terminate and stay resident
  46.     INT    21
  47. CSEG    ENDS
  48.     END    BEGIN
  49.